<!DOCTYPE html>
<!-- fieldset with only valid elements -->
<html>
 <head>
   <style>
     fieldset:valid { display: none; }
   </style>
 </head>
 <body>
   <fieldset id="fieldset">
    <input value='foo' required>
   </fieldset>
 </body>
</html>
